From 11e4944eda7c4bdd9e63616424801702dfb43570 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Thu, 5 May 2005 16:46:07 +0000 Subject: [PATCH] bitkeeper revision 1.1389.5.20 (427a4dcf057tQfMOhrkAUtc9VOgOyw) Remove __set_fixmap_ma and handle difference in installing machine-address and pseudo-physical-address fixmap entries inside __set_fixmap. fixmap.h: Remove __set_fixmap_ma and handle difference in installing machine-address and pseudo-physical-address fixmap entries inside __set_fixmap. ioremap.c: Change set_fixmap_ma call to set_fixmap call. init.c: Remove __set_fixmap_ma and handle difference in installing machine-address and pseudo-physical-address fixmap entries inside __set_fixmap. Change __set_fixmap_ma calls to set_fixmap calls and set_fixmap_ma_ro call to __set_fixmap(,, PAGE_KERNEL_RO) call. Signed-off-by: Christian Limpach --- .../arch/xen/x86_64/mm/init.c | 32 ++++++++----------- .../arch/xen/x86_64/mm/ioremap.c | 2 +- .../include/asm-xen/asm-x86_64/fixmap.h | 11 +------ 3 files changed, 15 insertions(+), 30 deletions(-) diff --git a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c index 4552b50176..d50d2218e1 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c @@ -361,7 +361,14 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t prot) printk("Invalid __set_fixmap\n"); return; } - set_pte_phys(address, phys, prot, SET_FIXMAP_KERNEL); + switch (idx) { + case VSYSCALL_FIRST_PAGE: + set_pte_phys(address, phys, prot, SET_FIXMAP_KERNEL); + break; + default: + set_pte_phys_ma(address, phys, prot); + break; + } } @@ -414,18 +421,6 @@ void __set_fixmap_user (enum fixed_addresses idx, unsigned long phys, pgprot_t p } - -void __set_fixmap_ma (enum fixed_addresses idx, unsigned long phys, pgprot_t prot) -{ - unsigned long address = __fix_to_virt(idx); - - if (idx >= __end_of_fixed_addresses) { - printk("Invalid __set_fixmap\n"); - return; - } - set_pte_phys_ma(address, phys, prot); -} - unsigned long __initdata table_start, table_end, tables_reserved; #if 0 @@ -632,8 +627,7 @@ void __init paging_init(void) free_area_init(zones_size); } - __set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info, - __pgprot(_KERNPG_TABLE)); + set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info); HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO); memset(empty_zero_page, 0, sizeof(empty_zero_page)); @@ -642,11 +636,11 @@ void __init paging_init(void) /* Setup mapping of lower 1st MB */ for (i = 0; i < NR_FIX_ISAMAPS; i++) if (xen_start_info.flags & SIF_PRIVILEGED) - __set_fixmap_ma(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE, - __pgprot(_KERNPG_TABLE)); + set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE); else - set_fixmap_ma_ro(FIX_ISAMAP_BEGIN - i, - virt_to_machine(empty_zero_page)); + __set_fixmap(FIX_ISAMAP_BEGIN - i, + virt_to_machine(empty_zero_page), + PAGE_KERNEL_RO); #endif } diff --git a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c index 1ac88b5e08..3714880f72 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c @@ -273,7 +273,7 @@ void __init *bt_ioremap(unsigned long phys_addr, unsigned long size) */ idx = FIX_BTMAP_BEGIN; while (nrpages > 0) { - set_fixmap_ma(idx, phys_addr); + set_fixmap(idx, phys_addr); phys_addr += PAGE_SIZE; --idx; --nrpages; diff --git a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h index 1947a09544..4c420f01ee 100644 --- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h +++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h @@ -60,22 +60,13 @@ enum fixed_addresses { extern void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags); -extern void __set_fixmap_ma (enum fixed_addresses idx, - unsigned long mach, pgprot_t flags); - #define set_fixmap(idx, phys) \ __set_fixmap(idx, phys, PAGE_KERNEL) - -#define set_fixmap_ma(idx, phys) \ - __set_fixmap_ma(idx, phys, PAGE_KERNEL) -#define set_fixmap_ma_ro(idx, phys) \ - __set_fixmap_ma(idx, phys, PAGE_KERNEL_RO) - /* * Some hardware wants to get fixmapped without caching. */ #define set_fixmap_nocache(idx, phys) \ - __set_fixmap_ma(idx, phys, PAGE_KERNEL_NOCACHE) + __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE) #define clear_fixmap(idx) \ __set_fixmap(idx, 0, __pgprot(0)) -- 2.30.2